<?php
header('Content-Type: text/xml');
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

echo "<?xml version='1.0' encoding='UTF-8'?>";

$con = mysql_connect("localhost","cubeMass_f","cubeSelectNow");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db("cubeMass", $con);
session_start();
	if($_SESSION[user_id]){
		$sql = "SELECT * FROM model WHERE ID = '$_POST[model_id]'";
		$result_model = mysql_query($sql,$con);
		$row_model = mysql_fetch_array($result_model);
		
		
		if($row_model['USER_ID'] == $_SESSION[user_id]){
			$_SESSION[model_id] = $_POST['model_id'];
			echo "in";
			}
			else
				{
					$_SESSION[model_id] = null;
					echo "not in";
				}
		}
	
mysql_close($con);
?>

